package com.sg.dto.biz.component.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc ExcelHeaderFieldDataDto
 * @使用场景
 */
@Data
public class ExcelHeaderFieldDataDto extends BaseDto implements Serializable {

    /**
     * excel表头英文字段
     */
    @ApiModelProperty("excel表头英文字段")
    private String excelHeaderEnFields;

    /**
     * excel表头中文字段
     */
    @ApiModelProperty("excel表头中文字段")
    private String excelHeaderCnFields;

    /**
     * excel表头字段排序
     */
    @ApiModelProperty("excel表头字段排序")
    private Long excelHeaderFieldSorting;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ExcelHeaderFieldDataDto that = (ExcelHeaderFieldDataDto) o;
        return excelHeaderEnFields == that.excelHeaderEnFields && excelHeaderCnFields == that.excelHeaderCnFields && excelHeaderFieldSorting == that.excelHeaderFieldSorting;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), excelHeaderEnFields, excelHeaderCnFields, excelHeaderFieldSorting);
    }

}
